<?php


// to use the json extension with views,
// we need to let cake know of the extension
	Router::parseExtensions( 'json' );
/**
 * Here, we are connecting '/' (base path) to controller called 'Pages',
 * its action called 'display', and we pass a param to select the view file
 * to use (in this case, /app/views/pages/home.ctp)...
 */
	Router::connect('/', array('controller' => 'users', 'action' => 'index'));
	Router::connect('/users/', array('controller' => 'users', 'action' => 'index'));
/**
 * Admin routing
 * 
 */
	Router::connect('/admin', array('controller' => 'administrators', 'action' => 'index',));
	
/**
 * ...and connect the rest of 'Pages' controller's urls.
 */
	//Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
	
/**
 * Signup routing 
 * 
 */	
	Router::connect('/signup', array('controller' => 'users', 'action' => 'signup'));
	
	
/**
 * Signup routing 
 * 
 */	
	Router::connect('/logout', array('controller' => 'users', 'action' => 'logout'));
	
/**
 * 
 * Avatar routing
 *  
 */
	Router::connect('/avatars', array('controller' => 'avatars', 'action' => 'index'));
	
	
/**
 * 
 * Company routing
 * 
 */
	Router::connect('/company', array('controller' => 'companies', 'action' => 'index'));
	Router::connect('/company/', array('controller' => 'companies', 'action' => 'index'));
	Router::connect('/company/create_company', array('controller' => 'companies', 'action' => 'setupCompany'));
        Router::connect('/company/change_logo/:companyid', array('controller' => 'companies', 'action' => 'changeLogo'));
        Router::connect('/company/edit/:companyid', array('controller' => 'companies', 'action' => 'edit'));
        Router::connect('/companies/view/:userid', array('controller' => 'companies', 'action' => 'view'));
        Router::connect('/company/:guid', array('controller' => 'companies', 'action' => 'viewCompany'));
/**
 * Favor
 *
 */
    Router::connect('/favors', array('controller' => 'favors', 'action' => 'index'));

 /**
  * Messages
  *
  */
     Router::connect('/messages', array('controller' => 'messages', 'action' => 'index'));
 /**
  * login routing
  */
Router::connect('/login', array('controller' => 'users', 'action' => 'login'));
/**
 * Profile routing
 * 
 */
	Router::connect('/:username', array('controller' => 'users', 'action' => 'profile'), array('username'));
	Router::connect('/profile/:username/*', array('controller' => 'users', 'action' => 'profile'), array(array('username')));
	
/**
 * 
 */
?>